import { App, Controller, Get } from "@midwayjs/core";
import { Application } from "../interface.js";

@Controller('/')
export class HomeController {
  @App('koa')
  app: Application;
  @Get('/')
  async home(): Promise<any> {
    // var inert_result=await knex('tb_books').insert({title: 'Slaughterhouse Five'})
    var result1=await  this.app.db.select().table('tb_books')
    return result1;
  }
}
